Public Class ShowPrint

    Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
        Dim PrintDB As New PrintDialog()
   
   
        PrintDB.Document = New System.Drawing.Printing.PrintDocument()

        If (PrintDB.ShowDialog() = DialogResult.OK) Then

            TextBox1.Text = ""

            TextBox1.AppendText("Printer: " & PrintDB.PrinterSettings.PrinterName)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("From Page: " & PrintDB.PrinterSettings.FromPage)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("To Page: " & PrintDB.PrinterSettings.ToPage)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Print Range: " & PrintDB.PrinterSettings.PrintRange)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Copies: " & PrintDB.PrinterSettings.Copies)
            TextBox1.AppendText(vbCrLf)

            If (PrintDB.PrinterSettings.LandscapeAngle = 90) Then
                TextBox1.AppendText("Landscape")
            Else
                TextBox1.AppendText("Portrait")
            End If
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Print to File: " & PrintDB.AllowPrintToFile)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Selection: " & PrintDB.AllowSelection)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Some Pages: " & PrintDB.AllowSomePages)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Print to File: " & PrintDB.PrintToFile)
            TextBox1.AppendText(vbCrLf)

            TextBox1.AppendText("Show Network: " & PrintDB.ShowNetwork)
        End If

    End Sub
End Class
